

set -e

set -x 


# blenderproc run blenderproc/scripts/download_cc_textures.py ./resources/cctextures
#* ln -s /baai-cwm-1/baai_cwm_ml/algorithm/shaocong.xu/exp/BlenderProc-3DFront/blenderproc/resources/front_3D/blender_label_mapping.csv  /baai-cwm-1/baai_cwm_ml/algorithm/shaocong.xu/exp/BlenderProc/blenderproc/resources/front_3D/blender_label_mapping.csv 

# export 'USE_EXTERNAL_BPY_MODULE=1'




rm -f examples/datasets/front_3d_with_improved_mat/failed_scene_names.txt

front_json_file=0a8d471a-2587-458a-9214-586e003e9cf9.json

time blenderproc run  examples/datasets/front_3d_with_improved_mat/render_dataset_improved_mat.py \
examples/datasets/front_3d_with_improved_mat/3D-FRONT \
examples/datasets/front_3d_with_improved_mat/3D-FUTURE-model \
examples/datasets/front_3d_with_improved_mat/3D-FRONT-texture ${front_json_file} \
resources/cctextures/ \
examples/datasets/front_3d_with_improved_mat/renderings_with_nocs



python visualization/front3d/vis_front3d.py --json_file 6a0e73bc-d0c4-4a38-bfb6-e083ce05ebe9.json


# out_dir=examples/datasets/front_3d_with_improved_mat/renderings_with_normal/0a8d471a-2587-458a-9214-586e003e9cf9;
# sub_task_name=$(echo ${out_dir} | cut -d'/' -f3)
# hdf5_list=$(ls ${out_dir})
# for x in ${hdf5_list[@]}; do 
#     python daniel_trail.py --src-path ${out_dir}/${x} --out-path logs/${sub_task_name}
# done














